package com.dream.style.app.ac.acc;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.dream.style.R;
import com.dream.style.app.ac.help.ViewHelper;

/**
 * @Created by lincyu
 * @Time: 2018/11/13 12:51
 * @Decs: 类
 */
public class ForgetPswActivity extends Activity {


    private TextView yzm;

    @Override
    protected void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_forgetpsw);

        yzm = findViewById(R.id.tv_get_yzm);
        initEvent();

    }

    private void initEvent() {
        // 验证码
        yzm = findViewById(R.id.tv_get_yzm);
        yzm.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(ForgetPswActivity.this,
                        "正在获取验证码", Toast.LENGTH_SHORT).show();
                // 第一步，进行倒计时动画
                ViewHelper.startDownTime(yzm,5000,1000);
                // 发送请求

            }


        });



        // 下一步
        findViewById(R.id.btn_next).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                start(ReSetPswActivity.class);
            }
        });
    }


    private void start(Class s) {
        Intent i = new Intent(this, s);
        startActivity(i);
        finish();
    }


}
